class FeesController < ApplicationController
  # GET /Fees
  # GET /Fees.xml
  def index
    @Fees = Fee.all
  end

  def show
    @Fee = Fee.find(params[:id])
  end

  def new
    @Fee = Fee.new
  end

  def edit
    @fee = Fee.find(params[:id])
  end

  def create
    @fee = Fee.new(params[:Fee])

    respond_to do |format|
      if @fee.save
        redirect_to :action => 'index', :notice => 'Fee was successfully created.'
      else
        render :action => "new"
      end
    end
  end
  def update
    @fee = Fee.find(params[:id])

    respond_to do |format|
      if @fee.update_attributes(params[:Fee])
        format.html { redirect_to(:action => 'index' , :notice => 'Fee was successfully updated.') }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @fee.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /Fees/1
  # DELETE /Fees/1.xml
  def destroy
    @fee = Fee.find(params[:id])
    @fee.destroy

    respond_to do |format|
      format.html { redirect_to(:action => 'index') }
      format.xml  { head :ok }
    end
  end
end
